<jsp:useBean id="employee" scope="request" type="com.course.spring.mvc.Employee"/>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: testy
  Date: 15.08.2023
  Time: 11:59
  To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<html>

<body>

<h2>Уважаемый сотрудник, пожалуйста, заполните свои данные</h2>

<br>
<br>


<form:form action="showDetails" modelAttribute="employee">

    Name <form:input path="name"/>
    <form:errors path="name"/>

    <br><br>

    Surname <form:input path="surname"/>
    <form:errors path="surname"/>

    <br><br>

    Salary <form:input path="salary"/>
    <form:errors path="salary"/>

    <br><br>

    Phone <form:input path="phoneNumber"/>
    <form:errors path="phoneNumber"/>

    <br><br>

    Email <form:input path="email"/>
    <form:errors path="email"/>

    <br><br>

    Department <form:select path="department">

    <form:options items="${employee.departments}"/>
<%--    <form:option value="Information Technology" label="IT"/>--%>
<%--    <form:option value="Human Resources" label="HR"/>--%>
<%--    <form:option value="Sales" label="Sales"/>--%>
    </form:select>
    <br><br>

    Which car do you want?
    <br><br>
    <form:radiobuttons path="carBrand" items="${employee.carBrands}" />
    <br><br>

    Foreign Language(s)?
    <br><br>
    <form:checkboxes path="languages" items="${employee.languagesMap}" />


    <br><br>
    <input type="submit" value="OK">
</form:form>

</body>

</html>
